<?xml version="1.0" encoding="UTF-8"?>
<!--
To change this template, choose Tools | Templates
and open the template in the editor.
-->
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
      xmlns:h="http://java.sun.com/jsf/html"
      xmlns:f="http://java.sun.com/jsf/core"
      xmlns:ui="http://java.sun.com/jsf/facelets"
      xmlns:p="http://primefaces.org/ui">
    <h:form id="frmChangePassword">
        <f:view>
            <p:dialog id="dlgChangePassword"
                      widgetVar="wgChangePassword"
                      header="Change Password"
                      draggable="true"
                      showEffect="clip"
                      hideEffect="clip"
                      >
                <h:panelGrid id="pnChangePassword" columns="2" cellspacing="5" >

                    <h:outputLabel value="Old-Password :" for="oldPassword" />
                    <p:password  id="oldPassword" requiredMessage="Old-Password not null" value="#{userBean.password}" required="true" maxlength="30" />

                    
                    <h:outputLabel value="Password:" for="password1" />
                    <p:password  match="repassword2" id="password1" value="#{system.user.password}" required="true" maxlength="30" />
                    <h:outputLabel value="Re-Password:" for="repassword2" />
                    <p:password  id="repassword2" value="#{system.user.password}" required="true" maxlength="30" />
                </h:panelGrid>

                <f:facet name="footer">
                    <p:commandButton  id="btnChangePassword"
                                      value="Save"
                                      icon="ui-icon-check"
                                      style="margin:0"
                                      actionListener="#{userBean.ChangePassword}"
                                      update=":growl"
                                      oncomplete="UserBeansRequest(xhr, status, args)"
                                      />
                    <p:commandButton id="btnCancelChangePassword"
                                     value="Cancel"
                                     icon="ui-icon-check"
                                     style="margin:0"
                                     onclick="wgChangePassword.hide();"
                                     />
                </f:facet>
            </p:dialog>
        </f:view>
    </h:form>
</html>
